import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: () =>
      import(/* webpackChunkName: "main2" */ "./views/main/index.vue"),
    redirect: "/gyxz",
    children: [
      {
        path: "/gyxz",
        name: "home",
        component: () =>
          import(/* webpackChunkName: "home2" */ "./views/gyxz/index.vue"),
      },
      {
        path: "/ykjr",
        name: "about",
        component: () =>
          import(/* webpackChunkName: "about2" */ "./views/ykjr/index.vue"),
      },
      {
        path: "/test",
        redirect: "/test1",
        children: [
          {
            path: "/test1",
            name: "about",
            component: () =>
              import(/* webpackChunkName: "about2" */ "./views/ykjr/index.vue"),
          },
        ],
      },
    ],
  },
];

export default routes;
